package com.onesports.intelligent.k12.polarlight.domain.dto.student;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author FPH
 * @since 2022年7月13日10:16:47
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "学员插入修改表")
public class StudentSaveDTO {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "性别")
    @NotBlank(message = "性别不可为空")
    @Length(max = 2,message = "生日长度不可超过2位")
    private String gender;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty(value = "出生日期")
    @NotNull(message = "生日不可为空")
    private Date birthday;

    @ApiModelProperty(value = "学生姓名")
    @NotBlank(message = "学生姓名不可为空")
    @Length(max = 20,message = "学生姓名长度不可超过20位")
    private String studentName;

    @ApiModelProperty(value = "证件号")
    @Length(max = 20,message = "身份证长度不可超过20位")
    private String idCard;
}
